import requests
# 添加员工
token="Bearer 61a099ce-1e24-4536-989f-91edaa7b3683"
id='1524645585548804096'
resp=requests.post(url="http://ihrm-test.itheima.net/api/sys/user",
                   headers={"Authorization": token},
                   json={ "username": "小李子", "mobile": "13869955998", "workNumber": "12546885564258"})
print("添加员工",resp.json())
# 修改员工
resp= requests.put(url="http://ihrm-test.itheima.net/api/sys/user"+ id,
                   headers={"Authorization": token},
                   json={"username":"小李飞刀","password":"654321"})
print("修改员工",resp.json())
# 查询员工
resp = requests.get(url="http://ihrm-test.itheima.net/api/sys/user"+ id,
                    headers={"Authorization": token},)
print("查询员工",resp.json())
# 删除员工
resp = requests.delete(url="http://ihrm-test.itheima.net/api/sys/user"+ id,
                    headers={"Authorization": token},)
print("删除员工",resp.json())